package com.overrided;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**重载
 * 
 * @author Administrator
 *
 */
public class OverLoadDemo {



	private static String classify(Set<?> s) {
		return "Set";
	}

	private static String classify(List<?> s) {
		return "List";
	}

	private static String classify(Collection<?> s) {
		return "Collection";
	}

	
	public static void main(String[] args) {
		Collection<?>[] collection = { new HashSet<String>(),
				new ArrayList<String>(), new HashMap<String, String>().values() };
		for (Collection<?> collection2 : collection) {
			System.out.println(classify(collection2));
			
//			Collection
//			Collection
//			Collection

		}
	}
}
